<template>
	<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration"
		:circular="circular" class="swiper-con" indicator-color="rgba(228,229,222,0.5)">
		<block v-for="(item,index) in background" :key="index">
			<swiper-item>
				<image :src="item.photoUrl"></image>
			</swiper-item>
		</block>
	</swiper>
</template>

<script>
	export default {
		naem: "mainswiper",
		props: {
			background: {
				type: Array
			}
		},
		data() {
			return {
				indicatorDots: true, //轮播是否有小圆点
				vertical: false, //false 横向   true 纵向
				autoplay: true, //自动播放
				interval: 2000, //动画时间
				duration: 500, //间隔时间
				circular: true, //衔接动画
			}
		}
	}
</script>

<style>
	.swiper-con {
		width: 750rpx;
		height: 372rpx;
	}

	.swiper-con image {
		width: 750rpx;
		height: 372rpx;
	}

	.swiper-con .wx-swiper-dot-active {
		background: #4eddf9;
		width: 24rpx;
		border-radius: 36%;
	}
</style>
